/**
 * Created by zd.
 */
import * as types from '../actions/ActionTypes'

const app = (state = {}, action) => {
  switch (action.type) {
    case types.FETCH_INDEX_DATA:
    return $.extend({},state,{index_data:action.index_data})
    case types.POST_TEST_MSG:
    return $.extend({},state,{test_data:action.test_data})
    case types.START_LOADING:
    return $.extend({},state,{loading:true})
    case types.FINISH_LOADING:
    return $.extend({},state,{loading:false})
    default:
      return state
  }
}
export default app
